<div class="course">
    <div class="title">我的课程</div>
    <div class="clist">
        {{#if $Cache_my_all_course_list.length}}
            {{#each $Cache_my_all_course_list}}
            <div class="item focus icon-{{ctype==1&&'jianpan'||'video'}}" title="课程:{{cname}},教师:{{tname}}">
                <a event-click="{{'$Top.$Event.get_my_local_course_detail'}}">
                    {{cname+" "+tname}}
                </a>
                <div title="删除" class="icon-delete2" event-click="{{'$Top.$Event.remove_course'}}"></div>
            </div>
            {{/each}}
        {{#else}}
        <h3>您还没有添加任何课程，请先从下方添加课程</h3>
        {{/if}}
    </div>
    <div class="cdlist {{$Cache_show_my_local_course_detail&&'focus'}}">
        <div class="cdtitle icon-{{$Cache_my_local_course_type==1&&'jianpan'||'video'}}">
            {{$Cache_my_local_course_name}}
            <div title="关闭" class="icon-jinru"  event-click="{{'$Event.close_my_local_course_detail'}}"></div>
        </div>
        {{#if $Top.$Cache_my_local_course_type==1}}
        <div class="items">
            {{#each $Cache_my_local_course_detail}}
            <div class="item" title="{{title+' '+start}}">
                {{($Index+1)+". "+title+" "+start}}
            </div>
            {{/each}}
        </div>
        {{#else}}
        <div class="items">
            {{#each $Cache_my_local_course_detail}}
            <a target="_blank" href="course_video.html?cid={{cid}}&vid={{id}}" class="item" title="{{name+' '+date}}">
                {{($Index+1)+". "+name+" "+date}}
            </a>
            {{/each}}
        </div>
        {{/if}}
    </div>
</div>

<div class="course">
    <div class="title">课程列表</div>
    <div class="clist">{{#each $Cache_all_course_list}}
        <div class="item icon-{{coursetype==1&&'jianpan'||'video'}}" title="课程:{{coursename}},教师:{{tname}}"
        event-click="{{'$Top.$Event.get_local_course_detail'}}">{{coursename+" "+tname}}</div>{{/each}}</div>
    <div class="cdlist {{$Cache_show_local_course_detail&&'focus'}}">
        <div class="cdtitle icon-{{$Cache_local_course_type==1&&'jianpan'||'video'}}">{{$Cache_local_course_name}}
            <div title="关闭" class="icon-jinru" event-click="{{'$Event.close_local_course_detail'}}"></div>
            <button class="icon-queding" event-click="{{'$Event.add_student_new_course'}}">添加到我的课程</button>
       </div>
         {{#if $Top.$Cache_local_course_type==1}}
        <div class="items">
            {{#each $Cache_local_course_detail}}
            <div class="item" title="{{title+' '+start}}">{{($Index+1)+". "+title+" "+start}}</div>
            {{/each}}
        </div>
        {{#else}}
        <div class="items">
            {{#each $Cache_local_course_detail}}
            <div class="item" title="{{name+' '+date}}">{{($Index+1)+". "+name+" "+date}}</div>
            {{/each}}
        </div>
        {{/if}} 
</div>